package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

/**
 * @Description: 出库单明细
 * @Author: jeecg-boot
 * @Date:   2021-10-14
 * @Version: V1.0
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_STOCK_CK_APPLY_ITEM")
@Schema(description="出库申请明细")
public class EquipmentStockCkApplyItem extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**id*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
	private String id;
	/**isDel*/
    @Column(name = "IS_DEL_")
    @Schema(description = "是否删除")
	private Integer isDel;
	/**版本*/
    @Column(name = "VERSION_")
    @Schema(description = "版本")
	private Integer version;
	/**用途*/
    @Dict(dicCode = "application")
    @Column(name = "APPLICATION_")
    @Schema(description = "用途")
	private String application;
	/**申请数量*/
    @Column(name = "APPLY_NUMBER_")
    @Schema(description = "申请数量")
	private Integer applyNumber;
	/**备注*/
    @Column(name = "REMARK_")
    @Schema(description = "备注")
	private String remark;
	/**备品*/
    @Dict(dicCode = "id",dicText = "name",dicEntity = EquipmentMaterial.class)
    @Column(name = "MATERIALS_ID_")
    @Schema(description = "备品")
	private String materialsId;
	/**出库类型*/
    // todo entity缺失
//    @Dict(dicCode = "id",dicText = "inoutTypeName",dicEntity =  EquipmentStockTypeInout.class)
    @Column(name = "CK_TYPE_ID_")
    @Schema(description = "出库类型")
	private String ckTypeId;
	/**出库单ID*/
    @Column(name = "CK_APPLY_ID_")
    @Schema(description = "出库单ID")
	private String ckApplyId;
	/**单据状态*/
    @Dict(dicCode = "rk_status")
    @Column(name = "STATUS_")
    @Schema(description = "单据状态")
	private Integer status;

	/**备品*/
	@Transient
	private String materialsName;
	@Transient
	private String materialsCode;
	@Transient
	private String materialsType;
	@Transient
	private String materialsBrand;
	@Transient
	private String materialsSpec;
	@Transient
	private String materialsUnit;
	@Transient
	private java.math.BigDecimal materialsEsPrice;
	@Transient
	private Integer stockNum;
	@Transient
	private Integer alreadyOutNumber;
}
